package aop;

/**
 * @BelongsProject: springboot_demo
 * @BelongsPackage: aop
 * @Author: 江岸
 * @CreateTime: 2021-05-25 10:52
 * @Description:  动态代理测试
 */
public class ProxyTest {
    public static void main(String[] args) {
        //jdk的动态代理
        ///注意一定要返回接口，不能返回实现类否则会报错
        Fruit agent = (Fruit) DynamicAgent.agent(Fruit.class, new Apple());
        agent.show();
    }
}
